import React, {Component} from 'react';

import {
    Modal,
    View,
    Text,
    TextInput,
    StyleSheet,
    TouchableHighlight
} from 'react-native';

import px2dp from '../utils/px2dp'

const styles = StyleSheet.create({
    container: {
        flexDirection: 'row',
        alignItems: 'center',
        height: px2dp(50),
    },
    textStyle: {
        fontSize: 16,
        marginLeft: 10,
    }
})

const CLEditView = ({title, value, placeholder, onChangeText, keyboardType}) => {
    return <View style={styles.container}>
        <Text style={styles.textStyle}>
            {title}
        </Text>
        <TextInput
            value={value}
            placeholder={placeholder}
            editable={true}
            keyboardType={keyboardType}
            underlineColorAndroid={'transparent'}
            style={{marginLeft: 10, padding: 0, flex: 1, borderWidth: 0,}}
            onChangeText={(text) => onChangeText(text)}
        />
    </View>
}

export default CLEditView;
